package com.wwwc.index.web.servlet;

import java.io.*;
import java.awt.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.ServletRequestWrapper;
import java.net.*;
import java.security.Security;
import java.security.Provider;
import javax.net.ssl.*;

import com.wwwc.util.web.*;
import com.wwwc.index.web.ejb.database.*;
import com.wwwc.index.web.ejb.*;

public class PaymentBean {//extends PaymentNotifyServlet {
    private EJBDatabaseQuery ejbdb;
    private Vector orderDetailVector;
    private String add_storage = "1";

    public StringBuffer payByCheck (String title, String user_name, StringBuffer order_sbf) {
	StringBuffer sbf = new StringBuffer ();
	sbf.append("<TABLE border=0 cellSpacing='0' cellPadding=5 width=80%>");	  
	sbf.append("<TR>");
	sbf.append("<TD align=center>");
	sbf.append("<B>"+title+"</B>"); 
	sbf.append("</TD>");
	sbf.append("</TR>");

	sbf.append("<TR>");
	sbf.append("<TD align=center>");
	sbf.append("<I>(Please attach this form with your check or money order)</I>"); 
	sbf.append("</TD>");
	sbf.append("</TR>");

	sbf.append("<TR>");
	sbf.append("<TD align=left>");
	sbf.append("<B>Date:&nbsp;&nbsp;</B>"+MyDateAndTime.getCurrentDate()); 
	sbf.append("</TD>");
	sbf.append("</TR>");

	sbf.append("<TR>");
	sbf.append("<TD align=left>");
	sbf.append("<B>Username:&nbsp;&nbsp;</B>"+user_name); 
	sbf.append("</TD>");
	sbf.append("</TR>");

	sbf.append("<TR>");
	sbf.append("<TD align=center>");
	
	sbf.append("</TD>");
	sbf.append("</TR>");

	sbf.append("<TR>");
	sbf.append("<TD align=left>");

	sbf.append("<table cellSpacing='0' cellPadding=5>");
	sbf.append("<tr>");
	sbf.append("<td align=left>");
	sbf.append("<B>Pay To Order Of :</B>");
	sbf.append("</td>");
	sbf.append("<td align=left>");
	sbf.append("3WCenter.com");
	sbf.append("</td>");
	sbf.append("</tr>");

	sbf.append("<tr>");
	sbf.append("<td align=left>");
	sbf.append("<B>Mail To :</B>");
	sbf.append("</td>");
	sbf.append("<td align=left> 5043 Westfield Ave. <BR>Suite D <BR>Pennsauken, NJ 08110</td>"); 
	sbf.append("</tr>");
	sbf.append("</table>");

	sbf.append("</TD>"); 
	sbf.append("</TR>");
	sbf.append("</TABLE><BR>");
	sbf.append(order_sbf); 
	return sbf;
    }

    public StringBuffer orderSumary (Vector vv) 
    {
	StringBuffer sbf = new StringBuffer ();	

	sbf.append("<TABLE border=1  cellSpacing=0 cellPadding=5 width=80%>");
	sbf.append("<TR>");
	sbf.append("<TD align=center colspan=6><B>Order Details</B></TD>");
	sbf.append("</TR>");
	sbf.append("<TR>");
	sbf.append("<TD align=center><B>Iteam Name</B></TD>");
	sbf.append("<TD align=center><B>Iteam ID</B></TD>");
	sbf.append("<TD align=center><B>Quantity</B></TD>");
	sbf.append("<TD align=center><B>Price</B></TD>");
	sbf.append("<TD align=center><B>Tax</B></TD>");
	sbf.append("<TD align=center><B>Sub-Total</B></TD>");
	sbf.append("</TR>");

	StringBuffer dsbf = new StringBuffer();

	try {
	    if(vv != null && !vv.isEmpty()) {
		Vector v = null;
		String name    = null;
		String id      = null;
		int quantity   = 0;
		double price   = 0.0;
		double tax     = 0.0;
		double s_total = 0.0;
		double total   = 0.0;

		Enumeration enum = vv.elements();
		while(enum.hasMoreElements()) {
		    v = (Vector)enum.nextElement();
		    name = (String)v.elementAt(0);
		    id   = (String)v.elementAt(1);
		    quantity = Integer.parseInt((String)v.elementAt(2));
		    price = Double.parseDouble((String)v.elementAt(3));
		    tax   = Double.parseDouble((String)v.elementAt(4));
		    s_total = quantity*(price+tax);
		    total += s_total;
		    dsbf.append("<TR><TD align=center>"+name+"</TD>");
		    dsbf.append("<TD align=center>"+id+"</TD>");
		    dsbf.append("<TD align=center>"+quantity+"</TD>");
		    dsbf.append("<TD align=right>$"+price+"</TD>");
		    dsbf.append("<TD align=right>$"+tax+"</TD>");
		    dsbf.append("<TD align=right>$"+s_total+"</TD>");
		    dsbf.append("</TR>");
		}
		dsbf.append("<TR><TD align=center><B>Total</B></TD>");
		dsbf.append("<TD align=center>--</TD>");
		dsbf.append("<TD align=center>--</TD>");
		dsbf.append("<TD align=center>--</TD>");
		dsbf.append("<TD align=center>--</TD>");
		dsbf.append("<TD align=right><B>$"+total+"</B></TD>");
		dsbf.append("</TR>");
	    }
	    else {
		dsbf.append("No order.");
	    }
	}
	catch(Exception e) {
	    System.out.println("PaymentBean:orderSumary:Error:"+e);   
	    dsbf = new StringBuffer("<TR><TD align=center colspan=6><img src=/images/star.gif>");
	    dsbf.append("<I>System error. Please try again.</I></TD></TR>");
	}
	sbf.append(dsbf);
	sbf.append("</TABLE>");
	return sbf;
    }

    public StringBuffer storageOrderSumary (String call_path, String mid, String update_cb, String name, 
					    String number, double price, String years, String total, String storage_id) 
    {
	StringBuffer sbf = new StringBuffer ();	
	sbf.append("<FORM method=post action="+call_path+">");
	sbf.append("<TABLE border=1  cellSpacing=0 cellPadding=5 width=80%>");
	sbf.append("<TR>");
	sbf.append("<TD align=center colspan=6><B>Order Details</B></TD>");
	sbf.append("</TR>");
	sbf.append("<TR>");
	sbf.append("<TD align=center><B>Iteam Name</B></TD>");
	sbf.append("<TD align=center><B>Iteam number</B></TD>");
	sbf.append("<TD align=center><B>Price</B></TD>");
	sbf.append("<TD align=center><B>Year(s)</B></TD>");
	sbf.append("<TD align=center><B>Total</B></TD>");
	sbf.append("</TR>");
	sbf.append("<TR><TD align=center>"+name+"</TD>");
	sbf.append("<TD align=center>"+number+"</TD>");
	sbf.append("<TD align=right>$"+price+"/year</TD>");
	sbf.append("<TD align=center>");
	sbf.append("<select size=1 name=years onChange=this.form.submit(); style='font-size:8pt'>");
	sbf.append(MyHtmlForm.getOptions(1,5, Integer.parseInt(years)));
	sbf.append("</select>");
	sbf.append("</TD>");
	sbf.append("<TD align=right>$"+total+"</TD>");
	sbf.append("</TR>");
	sbf.append("</TABLE>");
	sbf.append("<input type=hidden name=mid value="+mid+">");
	sbf.append("<input type=hidden name=aid value="+update_cb+">");
	sbf.append("<input type=hidden name=storage_id value="+storage_id+">");
	sbf.append("<input type=hidden name=update_years value=Update>");
	sbf.append("<BR>");
	sbf.append("<input type=submit name=process_payment value='Pay By Credit Card' style='font-size:8pt'>");
	sbf.append("</FORM>");
	return sbf;
    }
    
    public StringBuffer getPayPalStoragePaymentForm (String item_name, String item_number, String total, String years,
						     String user_name, String return_url, String paied_action, boolean submit) {
	StringBuffer sbf = new StringBuffer ();
	if(item_name == null || item_number == null || return_url == null || 
	   user_name == null) {
	    return sbf.append("Payment Error[101].");
	}

	String notify_url = null;	
	if(paied_action != null && paied_action.equals("add_storage")) {
	    notify_url = "http://3wcenter.com/index/PayPalNotify?aid=0-2&paied="+add_storage;
	}
	if(notify_url == null) {
	    return sbf.append("Payment Error[102].");
	}

	sbf.append("<FORM method=post name=paypal_form action=https://www.paypal.com/cgi-bin/webscr>");
	sbf.append("<TABLE border=0>");
	sbf.append("<TR><TD>");
	sbf.append("<input type=submit name=B value='Pay By Credit Card' style='font-size:8pt'>"); 
	sbf.append("</TD>");
	sbf.append("</TR>");
	sbf.append("</TABLE>");
	sbf.append("<input type=hidden name=cmd value=_xclick>");
	sbf.append("<input type=hidden name=business value=billing@3wcenter.com>");
	sbf.append("<input type=hidden name=item_name value=\""+item_name+"\">");
	sbf.append("<input type=hidden name=item_number value=\""+item_number+"\">");
	sbf.append("<input type=hidden name=custom value=\""+user_name+"\">");
	sbf.append("<input type=hidden name=quantity value="+years+">");
	sbf.append("<input type=hidden name=amount value="+total+">");
	sbf.append("<input type=hidden name=return value="+return_url+">");
	sbf.append("<input type=hidden name=notify_url value="+notify_url+">");
	sbf.append("</FORM>");
	if(submit) {
	    sbf.append("<SCRIPT>");
	    sbf.append("document.paypal_form.submit();");
	    sbf.append("</SCRIPT>");
	}
	return sbf;
    }

    public void payPalVerify(HttpServletRequest request) {

	try {
	    //============================================================
	    //read from paypal form
	    //============================================================
	    Enumeration enum = request.getParameterNames();
	    String str   = "cmd=_notify-validate";
	    String name  = null;
	    String value = null;

	    while(enum.hasMoreElements()){
		name  = (String)enum.nextElement();
		value = request.getParameter(name);
		str = str + "&" + name + "=" + URLEncoder.encode(value, "UTF-8");
	    }

	    //'custom','address_status','address_country','item_number','payment_fee','first_name',
	    //'address_state','mc_fee','business','payment_type','mc_gross','aid','mc_currency',
	    //'item_name','quantity','receiver_id','txn_type','verify_sign','payer_id','payer_status',
	    //'payment_gross','notify_version','tax','receiver_email','payer_email','address_city',
	    //'address_zip','payment_status','last_name','txn_id','address_street','paied',
	    //'address_name','payment_date'

	    //'username','confirmed','United States','23-4','0.01','William','NJ','0.01',
	    //'billing@3wcenter.com','instant','0.01','0-2','USD','1 year  10 MB Storage for Photos',
	    //'1','H9BKQTXE8ADQW','web_accept','Ay104UIiIKhw8zHgpT2veRnSoDtXA8xU8gEeLST2XM52NPbEWkA219F9',
	    //'PGJGXD2XUMQ8L','unverified','0.01','1.6','0.00','billing@3wcenter.com','William.Li@3wcenter.com',
	    //'Pennsauken','08110','Completed','Li','9AU49601MT888402H','5043 Westfield AveSuite D','1',
	    //'William Li','23:20:00 Aug 15, 2004 PDT'

	    // refound
	    //'custom','address_country','item_number','payment_fee','first_name','address_state','mc_fee','business',
	    //'payment_type','parent_txn_id','mc_gross','aid','mc_currency','receiver_id','verify_sign','payer_id',
	    //'payment_gross','notify_version','receiver_email','payer_email','address_city','address_zip','reason_code',
	    //'payment_status','last_name','txn_id','address_street','paied','address_name','payment_date'

	    //'username','United States','23-4','-0.01','William','NJ','-0.01','billing@3wcenter.com','instant',
	    //'9AU49601MT888402H','-0.01','0-2','USD','H9BKQTXE8ADQW','ALX92vL-d-vYw8ycnU.mvNCkEZ-9AgTMO10bA08qkp1s0kcxqhXrCWR.',
	    //'PGJGXD2XUMQ8L','-0.01','1.6','billing@3wcenter.com','William.Li@3wcenter.com','Pennsauken','08110',
	    //'refund','Refunded','Li','4KP14823HD444550A','5043 Westfield Ave Suite D','1','William Li','23:32:26 Aug 15, 2004 PDT'

	    //=============================================================
	    // post back to PayPal system to validate  
	    //=============================================================
	    /*
	    URL u = new URL("https://www.paypal.com/cgi-bin/webscr");
	    URLConnection uc = u.openConnection();
	    uc.setDoOutput(true);
	    uc.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
	    PrintWriter pw = new PrintWriter(uc.getOutputStream());
	    pw.println(str);
	    pw.close();
	    */

	    //=============================================================
	    //get respons from paypal server
	    //=============================================================
	    /*
	    BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
	    String res = in.readLine();
	    in.close();
	    */

	    //=============================================================
	    // save transaction log
	    //=============================================================
	    
	    boolean save_address_error = false;
	    String paied_action = request.getParameter("paied");

	    String user_name          = request.getParameter("custom"); // pass by 3WCenter.com
	    String user_business_name = request.getParameter("payer_business_name");
	    String payer_id           = request.getParameter("payer_id");
	    String payer_status       = request.getParameter("payer_status");
	    String payer_email        = request.getParameter("payer_email");

	    String first_name     = request.getParameter("first_name");
	    String last_name      = request.getParameter("last_name");

	    String address_name   = request.getParameter("address_name");
	    String address_street = request.getParameter("address_street");
	    String address_city   = request.getParameter("address_city");
	    String address_state  = request.getParameter("address_state");
	    String address_country= request.getParameter("address_country");
	    String address_zip    = request.getParameter("address_zip");
	    String address_status = request.getParameter("address_status");

	    String item_name      = request.getParameter("item_name");   // pass by 3WCenter.com
	    String item_number    = request.getParameter("item_number"); // pass by 3WCenter.com
	    String quantity       = request.getParameter("quantity");
	    String mc_gross       = request.getParameter("mc_gross");
	    String mc_fee         = request.getParameter("mc_fee");
	    String mc_currency    = request.getParameter("mc_currency");
	    String tax            = request.getParameter("tax");          // pass by 3WCenter.com

	    String payment_date   = request.getParameter("payment_date");
	    String payment_gross  = request.getParameter("payment_gross");
	    String payment_fee  = request.getParameter("payment_fee");
	    String payment_status = request.getParameter("payment_status");
	    String pending_reason = request.getParameter("pending_reason");
	    String payment_type   = request.getParameter("payment_type"); //instant

	    //transcation  

	    String txn_id          = request.getParameter("txn_id");   // transaction id
	    String txn_type        = request.getParameter("txn_type"); //web_accept

	    //==========================================================================
	    // Save address if needed
	    //==========================================================================

	    String query = "SELECT * FROM USER_ADDRESS WHERE USER_NAME='"+user_name+"' AND FIRST_NAME='"+first_name+"'"+
		" AND LAST_NAME='"+last_name+"' AND ADDRESS_NAME='"+address_name+"' AND ADDRESS_STREET='"+address_street+"'"+
		" AND ADDRESS_CITY='"+address_city+"' AND ADDRESS_STATUS='"+address_status+"' AND E_MAIL='"+payer_email+"';";

	    try {
		if (ejbdb == null) {
		    ejbdb = (new DatabaseEJBQuery()).getEJBDatabaseQuery();
		}
		
		ArrayList a = ejbdb.selectSingleRecord(query);
		if(a == null || a.isEmpty()) {
		    query = "INSERT INTO USER_ADDRESS (USER_NAME, FIRST_NAME, LAST_NAME, ADDRESS_NAME, ADDRESS_STREET,"+
			"ADDRESS_CITY, ADDRESS_STATE, ADDRESS_COUNTRY, ADDRESS_ZIP, ADDRESS_STATUS, E_MAIL) VALUES ("+
			"'"+user_name+"',"+"'"+first_name+"',"+"'"+last_name+"',"+"'"+address_name+"',"+"'"+address_street+"',"+
			"'"+address_city+"',"+"'"+address_state+"',"+"'"+address_country+"',"+"'"+address_zip+"',"+
			"'"+address_status+"',"+"'"+payer_email+"';";
		    if(ejbdb.insert(query)<0) {
			System.out.println("PaymentBean:payPalVerify:SaveAddress:Error:"+query);
			save_address_error = true;
		    }
		}
	    }
	    catch (Exception e) {
		System.out.println("PaymentBean:payPalVerify:Error:"+e);
		save_address_error = true;
	    }

	    if(save_address_error) {
		System.out.println("PaymentBean:payPalVerify:SaveAddressError");
		return;
	    }

	    //==========================================================================
	    // Save order before verify 
	    //==========================================================================
	    
	    boolean save_order_error = false;
	    if(paied_action != null && paied_action.equals(add_storage)) {
		// ORDERS
		// - - - ID(*) DATE CUSTOMER_ID AGENT_ID SALES_ID STATUS DESCRIPTION - - - 
		// - - - INT    TSP    VARN       VARN     VARN    VARN     VARN - - - 

		query = "INSERT INTO ORDERS (DATE, CUSTOMER_ID, STATUS, DESCRIPTION) VALUES "+
		    "('now','"+user_name+"','"+txn_id+"','"+item_name+"');";

		if(ejbdb.insert(query)<0) {
		    System.out.println("PaymentBean:payPalVerify:SaveOrderError:"+query);
		    return;
		}

		query = "SELECT ID FROM ORDER WHERE STATUS='"+txn_id+"';";
		String order_id = ejbdb.selectSingleFieldValue(query, "ID");
		if(order_id == null || order_id.length()<1) {
		    System.out.println("PaymentBean:payPalVerify:SaveTransactionError:"+query);
		    return;
		}

		String years      = quantity;
		String mid        = item_number.substring(0, item_number.indexOf("-"));
		String storage_id = item_number.substring(item_number.indexOf("-")+1);
		query = "SELECT PRICE FROM USER_STORAGE_PRICE WHERE ID="+storage_id+" AND MID="+mid+";";
		String price = ejbdb.selectSingleFieldValue(query, "PRICE");
		
		// ORDER_DETAIL
		//- - - ID(*) ORDER_ID ITEM_NAME ITEM_NUMBER UNIT UNIT_PRICE QUANTITY MEMO - - - 
		//- - - INT     INT      VARN       VARN     VARN   DOUBLE     DOUBLE VARN - - - 
		
		query = "INSERT INTO ORDER_DETAIL (ORDER_ID, ITEM_NAME, ITEM_NUMBER, UNIT, UNIT_PRICE, QUANTITY, MEMO)"+
		    "VALUES("+order_id+", '"+item_name+"','"+item_number+"','year',"+price+","+years+")";
		/*
		// USER_STORAGE
		//- - - ID(*) USER_NAME MID SUB_DIR SIZE START_TIME END_TIME INVOICE_ID - - - 
		//- - - INT     VARN    INT  VARN   INT    BIGINT    BIGINT     INT     - - - 

		query = "INSERT INTO USER_STORAGE (USER_NAME, MID, ADDRESS_STREET,"+
		    "ADDRESS_CITY, ADDRESS_STATE, ADDRESS_COUNTRY, ADDRESS_ZIP, ADDRESS_STATUS, E_MAIL) VALUES ("+
		    "'"+user_name+"',"+"'"+first_name+"',"+"'"+last_name+"',"+"'"+address_name+"',"+"'"+address_street+"',"+
		    "'"+address_city+"',"+"'"+address_state+"',"+"'"+address_country+"',"+"'"+address_zip+"',"+
		    "'"+address_status+"',"+"'"+user_email+"';";

		//INVOICE_DETAIL_ID(*) INVOICE_ID ORDER_ID PRODUCT_ID QUANTITY UNIT_PRICE PAYMENT_TERM DISCOUNT
		//      INT                INT      VARN       VAR       INT     DOUBLE       VARN      DOUBLE 

		//query = "";
		String order_id   = ""+System.currentTimeMillis();
		String years      = quantity;
		String mid        = item_number.substring(0, item_number.indexOf("-"));
		String storage_id = item_number.substring(item_number.indexOf("-")+1);


		// USER_STORAGE_INVOICE
		// ID(*) DATE USER_NAME STORAGE_ID STORAGE_SIZE DURATION UNIT_PRICE QUANTITY TOTAL MID SUB_DIR MEMO 
		
		//query = "INSERT INTO USER_STORAGE_INVOICE (DATE, USER_NAME, STORAGE_ID, LAST_NAME, ADDRESS_NAME, ADDRESS_STREET,"+
		    //"ADDRESS_CITY, ADDRESS_STATE, ADDRESS_COUNTRY, ADDRESS_ZIP, ADDRESS_STATUS, E_MAIL) VALUES ("+
		    //"'"+user_name+"',"+"'"+first_name+"',"+"'"+last_name+"',"+"'"+address_name+"',"+"'"+address_street+"',"+
		    //"'"+address_city+"',"+"'"+address_state+"',"+"'"+address_country+"',"+"'"+address_zip+"',"+
		    //"'"+address_status+"',"+"'"+user_email+"';";
		*/
	    }
	   

	    //==========================================================================
	    // Save transaction before verify 
	    //==========================================================================
	    /*
	    boolean save_transaction_error = false;
	    if(paied_action != null && paied_action.equals(add_storage)) {
		//INVOICE
		//ID(*) DATE CUSTOMER_ID EMPLOYEE_ID SALE_PERSON_ID SHIP_DATE SHIPED_TO SHIPED_VIA SHIP_COST STATUS MEMO 
		//INT    TSP     VARN       VARN         VARN          TSP       VARN       VARN    DOUBLE    VARN  VARN
		query = "INSERT INTO INVOICE (DATE, CUSTOMER_ID, SHIP_TO, STATUS, MEMO) VALUES "+
		    "('now','"+user_name+"','"+user_name+"', '"+txn_id+"', '"+item_name+"');";
		if(ejbdb.insert(query)<0) {
		    System.out.println("PaymentBean:payPalVerify:SaveTransactionError:"+query);
		    return;
		}

		query = "SELECT ID FROM INVOICE WHERE STATUS='"+txn_id+"';";
		String invoice_id = ejbdb.selectSingleFieldValue(query, "ID");
		if(invoice_id == null || invoice_id.length()<1) {
		    System.out.println("PaymentBean:payPalVerify:SaveTransactionError:"+query);
		    return;
		}

		String order_id   = ""+System.currentTimeMillis();
		String years      = quantity;
		String mid        = item_number.substring(0, item_number.indexOf("-"));
		String storage_id = item_number.substring(item_number.indexOf("-")+1);

		// USER_STORAGE
		//- - - ID(*) USER_NAME MID SUB_DIR SIZE START_TIME END_TIME INVOICE_ID - - - 
		//- - - INT     VARN    INT  VARN   INT    BIGINT    BIGINT     INT     - - - 

		query = "INSERT INTO USER_STORAGE (USER_NAME, MID, ADDRESS_STREET,"+
		    "ADDRESS_CITY, ADDRESS_STATE, ADDRESS_COUNTRY, ADDRESS_ZIP, ADDRESS_STATUS, E_MAIL) VALUES ("+
		    "'"+user_name+"',"+"'"+first_name+"',"+"'"+last_name+"',"+"'"+address_name+"',"+"'"+address_street+"',"+
		    "'"+address_city+"',"+"'"+address_state+"',"+"'"+address_country+"',"+"'"+address_zip+"',"+
		    "'"+address_status+"',"+"'"+user_email+"';";

		//INVOICE_DETAIL_ID(*) INVOICE_ID ORDER_ID PRODUCT_ID QUANTITY UNIT_PRICE PAYMENT_TERM DISCOUNT
		//      INT                INT      VARN       VAR       INT     DOUBLE       VARN      DOUBLE 

		//query = "";
		String order_id   = ""+System.currentTimeMillis();
		String years      = quantity;
		String mid        = item_number.substring(0, item_number.indexOf("-"));
		String storage_id = item_number.substring(item_number.indexOf("-")+1);


		// USER_STORAGE_INVOICE
		// ID(*) DATE USER_NAME STORAGE_ID STORAGE_SIZE DURATION UNIT_PRICE QUANTITY TOTAL MID SUB_DIR MEMO 
		
		//query = "INSERT INTO USER_STORAGE_INVOICE (DATE, USER_NAME, STORAGE_ID, LAST_NAME, ADDRESS_NAME, ADDRESS_STREET,"+
		    //"ADDRESS_CITY, ADDRESS_STATE, ADDRESS_COUNTRY, ADDRESS_ZIP, ADDRESS_STATUS, E_MAIL) VALUES ("+
		    //"'"+user_name+"',"+"'"+first_name+"',"+"'"+last_name+"',"+"'"+address_name+"',"+"'"+address_street+"',"+
		    //"'"+address_city+"',"+"'"+address_state+"',"+"'"+address_country+"',"+"'"+address_zip+"',"+
		    //"'"+address_status+"',"+"'"+user_email+"';";
		
	    }
	    */
	}
	catch (Exception e) {
	    System.out.println("PaymentBean:paypalVerify:"+e);
	}
    }
}
